package cc.rengu.igas.bomp.common.enums;

/**
 * Created by zhangxuran on 2020/03/30
 */
public enum ParamTypeEnum {
    MCHNT_IMAGE("01", "mchntImageParam"),
    ID_CRAD_CHECK("02", "mchntIdCardCheckFlag"),
    CREDIT_CHECK("03", "mchntCreditCheckFlag"),
    MCHNT_ACCOUNT("04", "mchntAccountSignFlag"),
    CHAIN_SUB_ACCOUNT("05", "chainSubAccountFlag"),
    LICENCE_MORE_MCHNT("06", "licenceMchntFlag"),
    ACCOUNT_MORE_MCHNT("07", "accountMchntFlg"),
    WITHDRAW_FLAG("08", "withDrawFlag"),
    RISK_DISTANCE("09", "riskDistance"),
    ALL_PARAMS("99", "all"),
    ;
    private String paramCode;
    private String paramValue;

    ParamTypeEnum(String paramCode, String paramValue) {
        this.paramCode = paramCode;
        this.paramValue = paramValue;
    }

    /*
     *@根据编码查询值
     * @paramCode 参数类型编码
     */
    public static String getValueByCode(String paramCode) {
        for (ParamTypeEnum paramTypeEnum : ParamTypeEnum.values()) {
            if (paramCode.equals(paramTypeEnum.getParamCode())) {
                return paramTypeEnum.getParamValue();
            }
        }
        return null;
    }

    public String getParamCode() {
        return paramCode;
    }

    public void setParamCode(String paramCode) {
        this.paramCode = paramCode;
    }

    public String getParamValue() {
        return paramValue;
    }

    public void setParamValue(String paramValue) {
        this.paramValue = paramValue;
    }
}
